    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>开关灯模式</title>
        <script src="../jquery-3.4.1.js"></script>
    </head>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 500px;
            height: 341px;
            margin: 100px auto;

        }
        body{
            height: 100%;
            width: 100%;
        }
    </style>
    <body>
    <button id="btn1">open</button>
    <button id="btn2">shut off</button>
    <div class="box">
        <img src="中华犬.jpg" alt="">
    </div>
    <script>
        jQuery(document).ready(function () {
        $('#btn1').click(function () {
            $('body').css({"background":"white"});
        });
            $('#btn2').click(function () {
                $('body').css({"background":"black",
                                "opacity":0.8

                });
            })
        })
    </script>
    </body>
    </html>